﻿using System.Collections.Generic;

namespace AutoDeployForSims.Utility
{
    public class XHJDWNumToName
    {
        //普通模拟量转换表
        //1-红灯,2-绿灯,3-黄灯,4-白灯,5-蓝灯,6-绿灯2(双绿),7-黄灯2(双黄),8-USU(黄闪黄),9-红闪/蓝闪(调)
        //10-BS(白闪),11-LS(绿闪),12-US(黄闪),13-绿黄,14-红白,15-灭灯
        private static Dictionary<int, string> xhjDWNumToName = new Dictionary<int, string>{
            {1, "红灯"}, {2, "绿灯"}, {3, "黄灯"}, {4, "白灯"}, {5, "蓝灯"},
            {6, "绿灯2(双绿)"}, {7, "黄灯2(双黄)"}, {8, "USU(黄闪黄)"}, {9, "红闪/蓝闪(调)"}, {10, "BS(白闪)"},
            {11, "LS(绿闪)"}, {12, "US(黄闪)"}, {13, "绿黄"}, {14, "红白"}, {15, "灭灯"},
        };

        /// <summary>
        /// 将普通灯位数字转换为文字
        /// </summary>
        /// <param name="xhjDWNum">10版灯位数字</param>
        /// <returns>10版灯位文字</returns>
        public static string ChangeXHJDWNumToName(int xhjDWNum)
        {
            string xhjDWName = "";
            if (xhjDWNum > 15 || xhjDWNum < 1)
            {
                xhjDWName = "error";
            }
            else
            {
                xhjDWName = xhjDWNumToName[xhjDWNum];
            }
            return xhjDWName;
        }

    }
}
